home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT6 / OUTSPEC.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  918 b   |  27 lines

  1. page    55,132
  2. ;
  3. ;       Program OutSpec ( Chapter 6 )
  4. ;
  5. ;       This  is  an  example  of using two different levels
  6. ;       of output procedures - BIOS service and DOS service.
  7. ;
  8. ;       Note  that  the  BIOS  procedure  outputs the symbol
  9. ;       "BELL" as  visible  symbol  while  the DOS procedure
  10. ;       takes the corresponding action - let's look and hear!
  11. ;
  12. .model  small
  13. .code
  14.     mov     ah,0Ah          ; function 0Ah - output symbol
  15.     mov     al,07h          ; AL - symbol to be output (BELL)
  16.     mov     bh,0            ; Video page is supposed to be 0
  17.     mov     bl,0            ; Used in graphic mode - here not needed
  18.     mov     cx,1            ; CX - number of symbols
  19.     int     10h             ; BIOS video service call
  20.  
  21.     mov     ah,02           ; Function 02h - output symbol
  22.     mov     dl,al           ; DL - symbol to be output
  23.     int     21h             ; DOS service call
  24.  
  25. .exit
  26.     end
  27.